package HomeWork;

/**
 * @description:
 * @Author yyp
 * @time
 */
public class HomeWork01 {
    public static void main(String[] args) {
        Car01 c = new Car01();
        Car01 c1 = new Car01(100);
        System.out.println(c);
        System.out.println(c1);
    }
}

class Car01{
    double price;
    static String color="write";
    @Override
    public String toString(){
        System.out.println("toString重载了");
        return price+"    "+color+"test";
    }
    public Car01(){
        this.price = 9;
        color = "red";
    }
    public Car01(double price){
        this.price = price;
    }
}
